package com.hfy.pcberpbackend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 报价单物料明细表实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("quote_items")
public class QuoteItem {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 报价单ID
     */
    @NotNull(message = "报价单ID不能为空")
    @TableField("quote_id")
    private Long quoteId;
    
    /**
     * 物料序号
     */
    @NotNull(message = "物料序号不能为空")
    @TableField("item_sequence")
    private Integer itemSequence;
    
    // 物料基本信息板块
    /**
     * 产品名称
     */
    @TableField("product_name")
    private String productName;
    
    /**
     * 物料编码
     */
    @TableField("material_code")
    private String materialCode;
    
    /**
     * 采购订单号
     */
    @TableField("purchase_order_number")
    private String purchaseOrderNumber;
    
    /**
     * 层数
     */
    @TableField("layer_count")
    private String layerCount;
    
    /**
     * 板厚
     */
    @TableField("board_thickness")
    private String boardThickness;
    
    /**
     * 表面处理
     */
    @TableField("surface_treatment")
    private String surfaceTreatment;
    
    /**
     * 阻焊
     */
    @TableField("solder_mask")
    private String solderMask;
    
    /**
     * 字符
     */
    @TableField("silkscreen")
    private String silkscreen;
    
    /**
     * 板材
     */
    @TableField("base_material")
    private String baseMaterial;
    
    /**
     * 交货尺寸
     */
    @TableField("delivery_size")
    private String deliverySize;
    
    /**
     * 拼版
     */
    @TableField("panelization")
    private String panelization;
    
    /**
     * 内铜
     */
    @TableField("inner_copper")
    private String innerCopper;
    
    /**
     * 外铜
     */
    @TableField("outer_copper")
    private String outerCopper;
    
    /**
     * 过孔工艺
     */
    @TableField("via_process")
    private String viaProcess;
    
    /**
     * 测试
     */
    @TableField("testing")
    private String testing;
    
    /**
     * 测试架费
     */
    @TableField("test_fixture_fee")
    private BigDecimal testFixtureFee;
    
    /**
     * 加急
     */
    @TableField("is_urgent")
    private String isUrgent;
    
    /**
     * 数量
     */
    @TableField("quantity")
    private Integer quantity;
    
    /**
     * 单价
     */
    @TableField("unit_price")
    private BigDecimal unitPrice;
    
    /**
     * 样板费
     */
    @TableField("sample_fee")
    private BigDecimal sampleFee;
    
    /**
     * 合计金额
     */
    @TableField("total_amount")
    private BigDecimal totalAmount;
    
    /**
     * 出货日期
     */
    @TableField("delivery_date")
    private LocalDate deliveryDate;
    
    /**
     * 备注
     */
    @TableField("item_remark")
    private String itemRemark;
    
    // 尺寸和价格信息板块
    /**
     * 宽度(mm)
     */
    @TableField("width_mm")
    private BigDecimal widthMm;
    
    /**
     * 长度(mm)
     */
    @TableField("length_mm")
    private BigDecimal lengthMm;
    
    /**
     * 数量
     */
    @TableField("dimension_quantity")
    private Integer dimensionQuantity;
    
    /**
     * 订单面积(mm²)
     */
    @TableField("order_area_mm")
    private BigDecimal orderAreaMm;
    
    /**
     * 平米价
     */
    @TableField("price_per_sqm")
    private BigDecimal pricePerSqm;
    
    /**
     * 未税单价
     */
    @TableField("untaxed_unit_price")
    private BigDecimal untaxedUnitPrice;
    
    /**
     * 未税金额
     */
    @TableField("untaxed_amount")
    private BigDecimal untaxedAmount;
    
    /**
     * 测试架费用
     */
    @TableField("test_fixture_cost")
    private BigDecimal testFixtureCost;
    
    /**
     * 未税总金额
     */
    @TableField("untaxed_total_amount")
    private BigDecimal untaxedTotalAmount;
    
    /**
     * 含税总金额
     */
    @TableField("taxed_total_amount")
    private BigDecimal taxedTotalAmount;
    
    /**
     * 含税单价
     */
    @TableField("taxed_unit_price")
    private BigDecimal taxedUnitPrice;
    
    // 费用明细板块
    /**
     * 板厚板材起步价
     */
    @TableField("base_price")
    private BigDecimal basePrice;
    
    /**
     * 阻燃费
     */
    @TableField("flame_retardant_fee")
    private BigDecimal flameRetardantFee;
    
    /**
     * 沉铜费
     */
    @TableField("copper_plating_fee")
    private BigDecimal copperPlatingFee;
    
    /**
     * 表面处理费
     */
    @TableField("surface_treatment_fee")
    private BigDecimal surfaceTreatmentFee;
    
    /**
     * 工程费
     */
    @TableField("engineering_fee")
    private BigDecimal engineeringFee;
    
    /**
     * 运费
     */
    @TableField("shipping_fee")
    private BigDecimal shippingFee;
    
    /**
     * 铜厚费
     */
    @TableField("copper_thickness_fee")
    private BigDecimal copperThicknessFee;
    
    /**
     * 超孔费
     */
    @TableField("extra_hole_fee")
    private BigDecimal extraHoleFee;
    
    /**
     * 阻抗费
     */
    @TableField("impedance_fee")
    private BigDecimal impedanceFee;
    
    /**
     * 半孔费
     */
    @TableField("half_hole_fee")
    private BigDecimal halfHoleFee;
    
    /**
     * 合拼费
     */
    @TableField("panel_fee")
    private BigDecimal panelFee;
    
    /**
     * 树脂塞孔费
     */
    @TableField("resin_plug_fee")
    private BigDecimal resinPlugFee;
    
    /**
     * 金手指费
     */
    @TableField("gold_finger_fee")
    private BigDecimal goldFingerFee;
    
    /**
     * 费用合计
     */
    @TableField("cost_total")
    private BigDecimal costTotal;
    
    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
    
    /**
     * 更新时间
     */
    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;
} 